import request from '@/utils/request'

// 登录函数
/**
 * @description: 登录函数
 * @param {*} data { username,password}
 * @return {*} promise
 */
export function loginAPI(data) {
  return request({
    url: '/park/login',
    method: 'POST',
    data
  })
}

/**
 * @param {*} params { name:string,page:string,pageSize:string}
 * @return {*} promise
 */
export function getEngerPriseListAPI(params) {
  return request({
    url: '/park/enterprise',
    method: 'GET',
    params
  })
}

/**
 * @param {*} id string
 * @return {*} promise
 */
export function delEnterPriseAPI(id) {
  return request({
    url: `/park/enterprise/${id}`,
    method: 'DELET'
  })
}
